﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/ServerNodeLib" xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/ServerNodeLib" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
  <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
  <xs:complexType name="NodeStatus">
    <xs:sequence>
      <xs:element minOccurs="0" name="AcceptNewJobs" type="xs:boolean" />
      <xs:element minOccurs="0" name="BatchId" type="ser:guid" />
      <xs:element minOccurs="0" name="EndTime" type="xs:dateTime" />
      <xs:element minOccurs="0" name="ErrorTimeout" type="xs:int" />
      <xs:element minOccurs="0" name="IpAddress" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="NodeId" type="ser:guid" />
      <xs:element minOccurs="0" name="NodeName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="NormalTimeout" type="xs:int" />
      <xs:element minOccurs="0" name="PercentComplete" type="xs:double" />
      <xs:element xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="ResultQueue" nillable="true" type="q1:ArrayOfguid" />
      <xs:element minOccurs="0" name="StartTime" type="xs:dateTime" />
      <xs:element minOccurs="0" name="State" type="tns:NodeState" />
      <xs:element minOccurs="0" name="StatusDescription" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="NodeStatus" nillable="true" type="tns:NodeStatus" />
  <xs:simpleType name="NodeState">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Error">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">-1</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Idle">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">0</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Running">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Announced">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">5</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DownloadingResources">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">10</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PostingResult">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">11</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="NodeState" nillable="true" type="tns:NodeState" />
  <xs:complexType name="ActionRequest">
    <xs:sequence>
      <xs:element minOccurs="0" name="ActionType" type="tns:ActionRequestType" />
      <xs:element minOccurs="0" name="PayloadKey" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="PayloadValue" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ActionRequest" nillable="true" type="tns:ActionRequest" />
  <xs:simpleType name="ActionRequestType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Error">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">-1</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="NoAction">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">0</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AnnounceNode">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ChangeSetting">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">2</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GetJob">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">5</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="KillJob">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">10</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ResetResultQueue">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">15</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SendResultQueue">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">16</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ResultAccpeted">
        <xs:annotation>
          <xs:appinfo>
            <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">17</EnumerationValue>
          </xs:appinfo>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="ActionRequestType" nillable="true" type="tns:ActionRequestType" />
  <xs:complexType name="BatchInfo">
    <xs:sequence>
      <xs:element minOccurs="0" name="BatchId" type="ser:guid" />
      <xs:element minOccurs="0" name="BatchResources" nillable="true" type="tns:ArrayOfResourceInfo" />
      <xs:element minOccurs="0" name="Commands" nillable="true" type="tns:ArrayOfCommandInfo" />
      <xs:element minOccurs="0" name="ReturnResources" nillable="true" type="tns:ArrayOfResourceInfo" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="BatchInfo" nillable="true" type="tns:BatchInfo" />
  <xs:complexType name="ArrayOfResourceInfo">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="ResourceInfo" nillable="true" type="tns:ResourceInfo" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfResourceInfo" nillable="true" type="tns:ArrayOfResourceInfo" />
  <xs:complexType name="ResourceInfo">
    <xs:sequence>
      <xs:element minOccurs="0" name="DestName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="DestSize" type="xs:long" />
      <xs:element minOccurs="0" name="Md5Hash" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="TransferChunkSize" type="xs:int" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ResourceInfo" nillable="true" type="tns:ResourceInfo" />
  <xs:complexType name="ArrayOfCommandInfo">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="CommandInfo" nillable="true" type="tns:CommandInfo" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfCommandInfo" nillable="true" type="tns:ArrayOfCommandInfo" />
  <xs:complexType name="CommandInfo">
    <xs:sequence>
      <xs:element minOccurs="0" name="Arguments" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="BreakOnException" type="xs:boolean" />
      <xs:element minOccurs="0" name="CaptureOutput" type="xs:boolean" />
      <xs:element minOccurs="0" name="Command" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="ErrorOnTimeOut" type="xs:boolean" />
      <xs:element minOccurs="0" name="MaxTimeSeconds" type="xs:int" />
      <xs:element minOccurs="0" name="MinTimeSeconds" type="xs:int" />
      <xs:element minOccurs="0" name="Path" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="CommandInfo" nillable="true" type="tns:CommandInfo" />
  <xs:complexType name="ResultInfo">
    <xs:sequence>
      <xs:element minOccurs="0" name="BatchId" type="ser:guid" />
      <xs:element minOccurs="0" name="CommandResults" nillable="true" type="tns:ArrayOfCommandResult" />
      <xs:element minOccurs="0" name="EndTime" type="xs:dateTime" />
      <xs:element minOccurs="0" name="IsSuccess" type="xs:boolean" />
      <xs:element minOccurs="0" name="ResourceResults" nillable="true" type="tns:ArrayOfResourceResult" />
      <xs:element minOccurs="0" name="StartTime" type="xs:dateTime" />
      <xs:element minOccurs="0" name="SummaryMessage" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ResultInfo" nillable="true" type="tns:ResultInfo" />
  <xs:complexType name="ArrayOfCommandResult">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="CommandResult" nillable="true" type="tns:CommandResult" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfCommandResult" nillable="true" type="tns:ArrayOfCommandResult" />
  <xs:complexType name="CommandResult">
    <xs:sequence>
      <xs:element minOccurs="0" name="Arguments" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="Command" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="EndTime" type="xs:dateTime" />
      <xs:element minOccurs="0" name="IsSuccess" type="xs:boolean" />
      <xs:element minOccurs="0" name="StartTime" type="xs:dateTime" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="CommandResult" nillable="true" type="tns:CommandResult" />
  <xs:complexType name="ArrayOfResourceResult">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="ResourceResult" nillable="true" type="tns:ResourceResult" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfResourceResult" nillable="true" type="tns:ArrayOfResourceResult" />
  <xs:complexType name="ResourceResult">
    <xs:sequence>
      <xs:element minOccurs="0" name="AlreadyExists" type="xs:boolean" />
      <xs:element minOccurs="0" name="Path" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="TransferSuccessfully" type="xs:boolean" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ResourceResult" nillable="true" type="tns:ResourceResult" />
</xs:schema>